package com.xzzz.irda.guardcat.core.metric.tomcat;

/**
 * Tomcat 中 StringCache 的信息
 *      为 byte 块 和 char 块 实现了一个字符串缓存。
 *
 * @author xzzz
 * @since 1.0.0
 */
public class TomcatStringCacheInfo {

    /**
     * 访问次数
     */
    private Integer accessCount;

    /**
     * 是否缓存 byte 块
     */
    private Boolean byteEnabled;

    /**
     * 是否缓存 char 块
     */
    private Boolean charEnabled;

    /**
     * 缓存大小
     */
    private Integer cacheSize;

    /**
     * 命中次数
     */
    private Integer hitCount;

    /**
     * 阈值
     */
    private Integer trainThreshold;


    public Integer getAccessCount() {
        return accessCount;
    }

    public void setAccessCount(Integer accessCount) {
        this.accessCount = accessCount;
    }

    public Boolean getByteEnabled() {
        return byteEnabled;
    }

    public void setByteEnabled(Boolean byteEnabled) {
        this.byteEnabled = byteEnabled;
    }

    public Boolean getCharEnabled() {
        return charEnabled;
    }

    public void setCharEnabled(Boolean charEnabled) {
        this.charEnabled = charEnabled;
    }

    public Integer getCacheSize() {
        return cacheSize;
    }

    public void setCacheSize(Integer cacheSize) {
        this.cacheSize = cacheSize;
    }

    public Integer getHitCount() {
        return hitCount;
    }

    public void setHitCount(Integer hitCount) {
        this.hitCount = hitCount;
    }

    public Integer getTrainThreshold() {
        return trainThreshold;
    }

    public void setTrainThreshold(Integer trainThreshold) {
        this.trainThreshold = trainThreshold;
    }

    @Override
    public String toString() {
        return "TomcatStringCacheInfo{" +
                "accessCount=" + accessCount +
                ", byteEnabled=" + byteEnabled +
                ", charEnabled=" + charEnabled +
                ", cacheSize=" + cacheSize +
                ", hitCount=" + hitCount +
                ", trainThreshold=" + trainThreshold +
                '}';
    }
}
